home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC-SIG: World of Games
/
PC-SIG World of Games (CDRM1080710) (1993).iso
/
ENT
/
DISK1000.ZIP
/
NETHACK.ZIP
/
BUGFIX
next >
Wrap
Text File
|
1992-04-30
|
4KB
|
115 lines
Due to the overwhelming number of requests for the code diffs to
fix NetHack pl 10 for a PC this diff is being posted. This diff will also
be available for anonymous ftp from linc.cis.penn.edu.
This diff is a patch for a Nethack 3.0 code set at patch level 10.
This diff was developed under the supervision of the NetHack PC dev
with special thanks to Yoshiaki Kasahara for pointing us in the right
direction.
This diff is a fix to the two bugs in patchlevel 10 of the code
that cause unplayable binaries to be built. The o_init.c diff fixes the
"scrambling" of names of objects when the game is saved in one set of
memory conditions, and restored under another. The Makefile diff will
fix an MSC optimization oddity that caused problems with our first
binary release. The purpose of this diff is to fix these bugs in the
*MSDOS PC* port of the game.
This code is not recommended for use to fix *any* other
bugs in *any* other port of NetHack. If you are experiencing any bug other
in a different port of the game, please contact
nethack-bugs@linc.cis.upenn.edu
Lastly, note that this is diff is only being released because of
inadquate testing on the part of the PC team. NetHack 3.0 code is no longer
under development by the dev team.
Good luck and Hack On!
- The PC team.
===== Begin Diff ===== 82 lines =====
*** o_init.co Thu Feb 28 12:49:50 1991
--- o_init.c Thu Feb 28 12:55:32 1991
***************
*** 273,280 ****
{
register int i;
unsigned int len;
! char *then; /* old location of "strange object" */
! register int differ; /*(ptrdiff_t)*/
#ifdef MACOS
/* provides position-independent save & restore */
/* by giving each object a number, keep track of it */
--- 273,281 ----
{
register int i;
unsigned int len;
! char *then; /* old location of "object name" */
! char *now = objects[0].oc_name; /* new location of "object name" */
! long differ; /*(ptrdiff_t)*/
#ifdef MACOS
/* provides position-independent save & restore */
/* by giving each object a number, keep track of it */
***************
*** 305,318 ****
objects[i].oc_descr = d[switches[i]].descr;
}
#else
! differ = objects[0].oc_name - then; /* note: expected to be 0 */
#endif /* MACOS */
for(i=0; i < TOTAL_OBJS; i++) {
#ifndef MACOS
if (differ && objects[i].oc_name)
objects[i].oc_name += differ;
if (differ && objects[i].oc_descr)
objects[i].oc_descr += differ;
#endif /* MACOS */
if (objects[i].oc_uname) {
mread(fd, (genericptr_t) &len, sizeof len);
--- 306,329 ----
objects[i].oc_descr = d[switches[i]].descr;
}
#else
! differ = (long)now - (long)then; /* note: expected to be 0 */
#endif /* MACOS */
for(i=0; i < TOTAL_OBJS; i++) {
#ifndef MACOS
if (differ && objects[i].oc_name)
+ #ifndef MSDOS
objects[i].oc_name += differ;
+ #else
+ objects[i].oc_name =
+ (const char *)((long)objects[i].oc_name + differ);
+ #endif
if (differ && objects[i].oc_descr)
+ #ifndef MSDOS
objects[i].oc_descr += differ;
+ #else
+ objects[i].oc_descr =
+ (const char *)((long)objects[i].oc_descr + differ);
+ #endif
#endif /* MACOS */
if (objects[i].oc_uname) {
mread(fd, (genericptr_t) &len, sizeof len);
*** others/Makefile.ovl Thu Mar 28 20:01:28 1991
--- others/Makefile.ovl Thu Mar 28 20:02:00 1991
***************
*** 46,52 ****
# /Gt22 is currently about the largest value that keeps the initialised data
# segment below 64K (and keeps the linker happy).
# 286 or higher machines can use the /G2 CFLAG option for better performance.
! CFLAGS = /A$(MODEL) /Oa /Gs /Gt22 /Zp1 /W0 /I$(INCL)
COSPACE = /Os
COSPEED = /Os # MSC 5.1 seems to be broken, or maybe it's the NetHack code.
# # Either way, setting COSPEED to /Ot wreaked jolly flaming havoc.
--- 46,52 ----
# /Gt22 is currently about the largest value that keeps the initialised data
# segment below 64K (and keeps the linker happy).
# 286 or higher machines can use the /G2 CFLAG option for better performance.
! CFLAGS = /A$(MODEL) /Gs /Gt22 /Zp1 /W0 /I$(INCL)
COSPACE = /Os
COSPEED = /Os # MSC 5.1 seems to be broken, or maybe it's the NetHack code.
# # Either way, setting COSPEED to /Ot wreaked jolly flaming havoc.
===== End Diff ===== 82 lines =====